import Layout from '@/views/layout'

export default {
  path: '/vehicle',
  name: 'vehicle',
  component: Layout,
  redirect: '/vehicle/operate',
  meta: {
    title: '车辆管理',
    icon: 'nested',
    perm: 'm:vehicle',
    sort: 2
  },
  children: [
    {
      path: '/vehicle/operate',
      name: 'outletsOperate',
      redirect: '/vehicle/operate/list',
      component: () => import('@/views/common/index'),
      meta: {
        title: '车辆运营',
        icon: 'nested',
        perm: 'm:vehicle:operate'
      },
      children: [
        {
          path: '/vehicle/operate/list',
          name: 'vehicleOperateList',
          component: () => import('@/views/vehicle/operate/list'),
          meta: {
            title: '运营列表',
            icon: 'table',
            perm: 'm:vehicle:operate:list'
          }
        },
        {
          path: '/vehicle/operate/review/:num',
          name: 'vehicleOperateReview',
          hidden: true,
          component: () => import('@/views/vehicle/operate/review-car'),
          meta: {
            title: '车辆图片',
            icon: 'table',
            activeMenu: '/vehicle/operate/list',
            perm: 'm:vehicle:operate:review'
          }
        }
      ]
    },
    {
      path: '/vehicle/manage',
      name: 'vehicleManage',
      component: () => import('@/views/common/index'),
      meta: {
        title: '车辆信息',
        icon: 'nested',
        perm: 'm:vehicle:manage'
      },
      children: [
        {
          path: '/vehicle/manage/list',
          name: 'vehicleManageList',
          component: () => import('@/views/vehicle/manage/list'),
          meta: {
            title: '车辆列表',
            icon: 'table',
            perm: 'm:vehicle:manage:list'
          }
        }
      ]
    },
    {
      path: '/vehicle/dispatcher',
      name: 'vehicleDispatcher',
      component: () => import('@/views/common/index'),
      meta: {
        title: '车辆调度',
        icon: 'nested',
        perm: 'm:vehicle:dispatcher'
      },
      children: [
        {
          path: '/vehicle/dispatcher/list',
          name: 'vehicleDispatcherList',
          component: () => import('@/views/vehicle/dispatcher/list'),
          meta: {
            title: '调度列表',
            icon: 'table',
            perm: 'm:vehicle:dispatcher:list'
          }
        },
        {
          path: '/vehicle/dispatcher/widthdraw/:id',
          name: 'vehicleDispatcherWidthdraw',
          component: () => import('@/views/finance/widthdraw'),
          hidden: true,
          meta: {
            title: '提现明细',
            icon: 'table',
            perm: 'm:vehicle:dispatcher:widthdraw',
            activeMenu: '/vehicle/dispatcher/list'
          }
        }
      ]
    },
    {
      path: '/vehicle/type',
      name: 'vehicleType',
      component: () => import('@/views/common/index'),
      meta: {
        title: '车辆类型',
        icon: 'nested',
        perm: 'm:vehicle:type'
      },
      children: [
        {
          path: '/vehicle/type/list',
          name: 'vehicleTypeList',
          component: () => import('@/views/vehicle/type/list'),
          meta: {
            title: '类型列表',
            icon: 'table',
            perm: 'm:vehicle:type:list'
          }
        }
      ]
    },
    {
      path: '/vehicle/repair',
      name: 'vehicleRepair',
      component: () => import('@/views/common/index'),
      meta: {
        title: '车辆维修',
        icon: 'nested',
        perm: 'm:vehicle:repair'
      },
      children: [
        {
          path: '/vehicle/repair/list',
          name: 'vehicleRepairList',
          component: () => import('@/views/vehicle/repair/list'),
          meta: {
            title: '维修列表',
            icon: 'table',
            perm: 'm:vehicle:repair:list'
          }
        }
      ]
    }
  ]
}
